﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SalesOneWeb.Master" AutoEventWireup="true" CodeBehind="AddUnit.aspx.cs" Inherits="IronOne.SalesOne.SalesOneWeb.Structure.AddUnit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 486px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table id="data" border="0">
                    <tr>
                        <td align="center" colspan="3">
                            <asp:Label ID="LblHeader" runat="server"></asp:Label>                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblGroup1" runat="server" Text="Group:"></asp:Label>
                        </td>
                        <td align="right">
                            &nbsp;</td>
                        <td class="style1">
                            <asp:DropDownList ID="drpGroup" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="drpGroup_SelectedIndexChanged">
                                <asp:ListItem Value="-1">Select</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="lblGroup" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblBranch1" runat="server" Text="Branch:"></asp:Label>
                        </td>
                        <td align="right">
                            &nbsp;</td>
                        <td class="style1">
                            <asp:DropDownList ID="drpBranch" runat="server" AutoPostBack="True">
                                <asp:ListItem Value="-1">Select</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="labelBranch" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Code:</td>
                        <td align="right">
                            &nbsp;</td>
                        <td class="style1">
                            <asp:TextBox ID="txtCode" runat="server"></asp:TextBox>
                            <asp:Label ID="FieldLblCode" runat="server"></asp:Label>
                            <asp:RequiredFieldValidator ID="CodeValidator" runat="server" 
                                ControlToValidate="txtCode" ErrorMessage="Field is required.">Field is required.</asp:RequiredFieldValidator>                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Name:</td>
                        <td align="right">
                            &nbsp;</td>
                        <td class="style1">
                            <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                            <asp:Label ID="FieldLblName" runat="server"></asp:Label>
                            <asp:RequiredFieldValidator ID="NameValidator" runat="server" 
                                ControlToValidate="txtName" ErrorMessage="Name is required.">Name is required.</asp:RequiredFieldValidator>                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Effective From:</td>
                        <td align="right">
                            &nbsp;</td>
                        <td class="style1">
                            <asp:TextBox ID="txtEffectiveFrom" runat="server"></asp:TextBox>                        
                            <asp:Label ID="FieldLblFrom" runat="server"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtEffectiveFrom" 
                                ErrorMessage="Date Field is required.">Date Field is required.</asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="FromValidator" runat="server" 
                                ControlToValidate="txtEffectiveFrom" ErrorMessage="Not in correct format" 
                                Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Effective To:</td>
                        <td align="right">
                            &nbsp;</td>
                        <td class="style1">
                            <asp:TextBox ID="txtEffectiveTo" runat="server"></asp:TextBox>                        
                            <asp:Label ID="FieldLblTo" runat="server"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="txtEffectiveTo" ErrorMessage="Date Field is required.">Field is required.</asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="ToValidator" runat="server" ControlToValidate="txtEffectiveTo" 
                                ErrorMessage="Not in correct format" Operator="DataTypeCheck" Type="Date"></asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="3">
                            <asp:CompareValidator ID="CompareValidator" runat="server" 
                                ControlToCompare="txtEffectiveTo" ControlToValidate="txtEffectiveFrom" 
                                ErrorMessage="Effective To date must be greater than Effective From date" 
                                Operator="LessThan" Type="Date"></asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="3" style="color:Red;">
                            <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>                        </td>
                    </tr>
                    <tr>
                        <td align="right" style="color:Red;"></td>
                        <td align="right" style="color:Red;">&nbsp;</td><td class="style1">&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="BtnDone" runat="server" Text="Done" Height="26px" 
                                        onclick="BtnDone_Click" />
                                  &nbsp;<asp:Button ID="btnSearch" runat="server" Text="Search" 
                                        CausesValidation="False" /></td>
                        <td align="right" style="color:Red;">
                            <table border="0">
                              <tr>
                                <td align="right">
                                    &nbsp;</td>
                                
                                <td align="right">
                                    &nbsp;</td>
                              </tr>
                            </table>
                      </td>
                    </tr>
                </table>
</asp:Content>
